﻿@model DingTalkAgent.Model.SysNav
@{
    ViewBag.Title = "Edit";
    Layout = null;
}

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <h4 class="modal-title">修改栏目</h4>
</div>
<div class="modal-body">
@using (Html.BeginForm("SysNEdit", "SysBase", FormMethod.Post, new { id = "form_Edit", name = "form_Edit" }))
            {
        <table cellspacing="0" cellpadding="0" width="100%" class="table">
            <tr>
                <th>
                    Nav_ID：
                </th>
                <td>
                    @Html.HiddenFor(model => model.Nav_ID) @Model.Nav_ID
                </td>
            </tr>
            <tr>
                <th>
                    父级编号：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.Parent_ID, new { @class = "form-control" })
                </td>
            </tr>
            <tr>
                <th>
                    栏目：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
                </td>
            </tr>
            <tr>
                <th>
                    图标：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.Ioc, new { @class = "form-control" })
                </td>
            </tr>
            <tr>
                <th>
                    鼠标移上去显示的文字：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.Alt, new { @class = "form-control" })
                </td>
            </tr>
            <tr>
                <th>
                    排序编号：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.OrderID, new { @class = "form-control" })
                </td>
            </tr>
            <tr>
                <th>
                    关联页面：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.PageName, new { @class = "form-control" })
                    @Html.HiddenFor(model => model.Page_ID)
                    <a href="#" onclick="selectPage()" class="btn btn-outline btn-success">选择</a><a href="#" onclick="ClearPage()" class="btn btn-outline btn-success">..清空..</a>
                    <div>
                    </div>
                </td>
            </tr>
            <tr>
                <th>
                    编码：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.Code, new { @class = "form-control" })
                    <div>
                    </div>
                </td>
            </tr>
            <tr>
                <th>
                    是否启用：
                </th>
                <td>
                    @Html.CheckBoxFor(model => model.active)
                </td>
            </tr>
        </table>

    }
    <div class="remark">
        <div class="remark_tit">
            温馨提示
        </div>
        <div class="remark_content">
            <p>
                <span class="must">*</span>*项必须填写。
            </p>
        </div>
    </div>
</div>

<div class="modal-footer">
    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
    <button type="button" class="btn btn-primary" id="Edit">保存</button>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        $("#Edit").click(function () {
            SetData("/SysBase/SysNEdit", "信息修改成功!");
        });

        $('#Ioc').uploadFile({ key: '.Logo' });

    });
    function selectPage() {
        parent.layer.open({
            type: 2,
            title: false,
            skin: 'layui-layer-lan',
            shadeClose: false,
            shade: 0.3,
            scrollbar: false,
            area: ['1000px', '720px'],
            content: 'SysPList?isPopup=true' //iframe的url
        });
    }

    function ClearPage() {
        $("#Page_ID").val(-1);
        $("#PageName").val("");
        $("#Code").val("");
    }

    function changeParentPage(_id, _name, _code) {
        $("#Page_ID").val(_id);
        $("#PageName").val(_name);
        $("#Code").val(_code);
        layer.close(layer.index);
    }

</script>
